package com.crm.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.crm.entity.Askers;

public interface AskersRepository extends JpaRepository<Askers, Integer>,JpaSpecificationExecutor<Askers>{

	@Query(value="SELECT a.asker_id FROM askers a WHERE a.user_id = :userid",nativeQuery=true)
	public Integer getaskerid(String userid);
	
	//查询已签到的咨询师
		@Query(value="select * from askers INNER JOIN users where askers.user_id=users.user_id and users.check_state='已签到'",nativeQuery=true)
		List<Askers> GetQianDaoAll();
		
		
}
